package oo.Day04.nigthText3max;

public class CustomerList {
    private Customer[] customers;
    private int total = 0;

    public CustomerList(int totalCustomer){
        customers = new Customer[totalCustomer];
    }

    public boolean addCustomer(Customer customer){
        return false;
    }

    public boolean replaceCustomer(int index,Customer cust){
        return false;
    }

    public boolean deleteCustomer(int index){
        if(index<0||index>10){
            System.out.println("输出有误，请重新输入！");
            return false;
        }
        for(int i=index;i<9;i++){
            customers[index]=customers[index+1];
        }
        index--;
        return true;
    }

    public Customer[] getCustomers() {
        return customers;
    }

    public Customer getCustomer(int index){
        return customers[index];
    }
}
